<!DOCTYPE HTML>
<html lang="zxx">
<head>
	<title>路游</title>
	<!-- Meta tag Keywords -->
	<meta name="viewport" content="width=device-width, initial-scale=1">
	<meta charset="UTF-8" />
	<meta name="keywords" content=""
	/>
	<script>
		addEventListener("load", function () {
			setTimeout(hideURLbar, 0);
		}, false);
		function hideURLbar() {
			window.scrollTo(0, 1);
		}
	</script>
	<!-- Meta tag Keywords -->
	<!-- css files -->
	<link rel="stylesheet" href="__STATIC__/admin/css/login.css" type="text/css" media="all" />
	<!-- Style-CSS -->
	<link rel="stylesheet" href="__STATIC__/admin/css/fontawesome-all.css">

	<link rel="stylesheet" href="__STATIC__/admin/dist/css/modify-up.css" />

	<style>
		.popup_but{
			background-color: #2F4056;
		}

		.popup_top{
			background-color: #2F4056;
		}

		.popup_but:hover{
			background-color: #000;
		}
	</style>
	<!-- Font-Awesome-Icons-CSS -->
	<!-- //css files -->
	<!-- web-fonts -->
<!-- 	<link href="http://maxcdn.bootstrapcdn.com/css?family=Josefin+Sans:100,100i,300,300i,400,400i,600,600i,700,700i" rel="stylesheet">
	<link href="http://maxcdn.bootstrapcdn.com/css?family=Open+Sans:300,300i,400,400i,600,600i,700,700i,800,800i" rel="stylesheet"> -->
	<!-- //web-fonts -->
</head>
<body>
	<!-- bg effect -->
	<div id="bg">
		<canvas></canvas>
		<canvas></canvas>
		<canvas></canvas>
	</div>
	<!-- //bg effect -->
	<!-- title -->
	<h1>路游后台登录</h1>
	<!-- //title -->
	<!-- content -->
	<div class="sub-main-w3">
		<form action="#" method="post" id="form">
			<h2>现在登录
				<i class="fas fa-level-down-alt"></i>
			</h2>
			<div class="form-style-agile">
				<label>
					<i class="fas fa-user"></i>
					用户名
				</label>
				<input placeholder="用户名" name="username" type="text" required="" value="{$adminLogin.username}" autocomplete="off">
			</div>
			<div class="form-style-agile">
				<label>
					<i class="fas fa-unlock-alt"></i>
					密码
				</label>
				<input placeholder="密码" name="password" type="password" required="" value="{$adminLogin.password}" autocomplete="off">
			</div>
			<!-- checkbox -->
			<div class="wthree-text">
				<ul>
					<li>
						<label class="anim">
							<input type="checkbox" class="checkbox" required="" {if $adminLogin.remPass}checked{/if} name="remPass" >
							<span>记住密码</span>
						</label>
					</li>
					<!-- <li>
						<a href="#">Forgot Password?</a>
					</li> -->
				</ul>
			</div>
			<!-- //checkbox -->
			<input type="submit" value="登 录" id="btn">
		</form>
	</div>
	<!-- //content -->
	<!-- copyright -->
	<div class="footer">
		<!-- <p>Copyright &copy; 2018.Company name All rights reserved.</p> -->
	</div>
	<!-- //copyright -->
	<!-- Jquery -->
	<script src="__STATIC__/admin/js/jquery-3.3.1.min.js"></script>
	{include file='admin@common/alert'/}
	<!-- //Jquery -->
	<script type="text/javascript">
		var commitStatus = false;
		$(function(){
			$("#btn").click(function(e){
			    if (commitStatus == true){
			        return false;
				}
				commitStatus = true;
				e.preventDefault();
				var form = $("#form").serialize();
				$.ajax({
					type: "POST",
					url : "/admin/login/login",
					data: form,
					success:function(data){
						console.log(data);
						if(data.code == 1){
							window.location.href = "/admin/index/common";
							// window.location.href = "http://web.profittravel.com/public.html";
							return;
						}
						$(".maksa").css("width",$(window).width());
						$(".maksa").css("height",$(document).height());
						$(".maksa").show();
						$(".popup").css("left",($(window).width()-$(".popup").width())/2);
						$(".popup").css("top",($(window).height()-$(".popup").height())/2);
						$("#popup_1").show();  //简单的触发弹窗事件如果要触发自己想要的弹窗 请修改选择器为ID选择器 两种弹框
						$('.popup_cont').html(data.err);
						commitStatus = false;
						// alert(data.err);
						// $("#append").remove();
						// if(data.code == -1 || data.code==-2 ||  data.code==-4 || data.code==-6){
						// 	$("#info_list").append('<div style="padding-top: 5px;margin-bottom: -10px;color:red;font-family:微软雅黑" id="append">'+ data.err +'</div>');
						// }
						// if(data.code == -5 || data.code==-3){
						// 	$("#info_data").append('<div style="padding-top: 5px;margin-bottom: -10px;color:red;font-family:微软雅黑" id="append">'+ data.err +'</div>');
						// }
					}
				})
			})
		})
	</script>
	<!-- effect js -->
	<script src="__STATIC__/admin/js/canva_moving_effect.js"></script>
	<!-- //effect js -->
</body>
</html>